<?php

function news_run($task) {
    switch($task)  {
        default: view(); break;
    }
}

function view() {
    $q = "SELECT * FROM bai_viet";
    $r = mysql_query($q);
    loadTemplate("view", array("r"=>$r));
}


function upload() {
    if($_SERVER['REQUEST_METHOD']=='POST')
    {
        
    }
}